package com.guchenbo.schedule.biz;

import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.Trigger;

/**
 * @author guchenbo
 * @date 2021/4/25
 */
public class SimpleQuartzJob implements Job {

  protected static final Logger log = LoggerFactory.getLogger(SimpleQuartzJob.class);
  /**
   * <p>
   * Called by the <code>{@link Scheduler}</code> when a <code>{@link Trigger}</code> fires that is
   * associated with the <code>Job</code>.
   * </p>
   *
   * <p>
   * The implementation may wish to set a {@link JobExecutionContext#setResult(Object) result}
   * object on the {@link JobExecutionContext} before this method exits.  The result itself is
   * meaningless to Quartz, but may be informative to
   * <code>{@link JobListener}s</code> or
   * <code>{@link TriggerListener}s</code> that are watching the job's
   * execution.
   * </p>
   *
   * @param context
   * @throws JobExecutionException if there is an exception while executing the job.
   */
  public void execute(JobExecutionContext context) throws JobExecutionException {
    log.info("job run");
  }
}
